import {Button, Space} from "antd";
import React from "react";

export function PopoverConfirmButtons(props: {
    onCancel: () => void,
    onConfirm: () => Promise<void>,
    confirmDisabled?: boolean
    confirmButtonLoading?:boolean
}) {
    return <Space align={"end"} style={{width: "100%", justifyContent: "end"}}>
        <Button size={"small"} onClick={props.onCancel}>取消</Button>
        <Button size={"small"} type={"primary"} onClick={props.onConfirm} loading={props.confirmButtonLoading} disabled={props.confirmDisabled}>确定</Button>
    </Space>;
}